package ycyc.Games.gomoku.model;

import java.awt.Color;

public class Point {
	private Color color;// 颜色
	private int diameter = 30;// 直径
	public int x;
	public int y;
	public Point(int x, int y, Color color) {
		this.x = x;
		this.y = y;
		this.color = color;
	}

	public Color getColor() {
		return color;
	}

	public void setColor(Color color) {
		this.color = color;
	}

	public  int getDiameter() {
		return diameter;
	}
	  public int getX() {  
	      return x;  
	  }  

	  public Point setX(int x) {  
	      this.x = x;  
	      return this;  
	  }  

	  public int getY() {  
	      return y;  
	  }  

	  public Point setY(int y) {  
	      this.y = y;  
	      return this;  
	  }  

	  public Point(int x, int y) {  
	      this.x = x;  
	      this.y = y;  
	  }  


	  @Override  
	  public int hashCode() {  
	      return x + y;  
	  }  

	  @Override  
	  public boolean equals(Object obj) {  
	      if (this == obj)  
	          return true;  
	      Point other = (Point) obj;  
	      if (x != other.x)  
	          return false;  
	      if (y != other.y)  
	          return false;  
	      return true;  
	  }  
}
